﻿using UnityEngine;
using System.Collections;
using System;
using FairyGUI;

public class UIPopupWindow {

    GComponent _uiComp;
    public GComponent uiComp { get { return _uiComp; } }

    /// <summary>
    /// 关闭回调
    /// </summary>
    protected Action _closeCallback;

    protected void Init(GComponent comp)
    {
        _uiComp = comp;
    }

    protected void Close()
    {
        if (_closeCallback != null)
        {
            _closeCallback();
        }
    }

    /// <summary>
    /// 设置关闭事件
    /// </summary>
    /// <param name="callback"></param>
	public void OnClose(Action callback)
    {
        _closeCallback = callback;
    }
}
